/*
 * ece511pong.c
 *
 *  Created on: Sep 24, 2014
 *      Author: Jeff Keurian, Steve Blount, Scott Holt, Manzir Zaman
 */

#include <msp430.h>

int JeffMain();
int ManzirMain();
int ScottMain();
int SteveMain();

int main(void) {
	return JeffMain();
}

int JeffMain(void) {
	WDTCTL = WDTPW | WDTHOLD;		// Stop watchdog timer
	P1DIR |= 0x01;					// Set P1.0 to output direction

	for(;;) {
		volatile unsigned int i;	// volatile to prevent optimization

		P1OUT ^= 0x01;				// Toggle P1.0 using exclusive-OR

		i = 10000;					// SW Delay
		do i--;
		while(i != 0);
	}

	return 0;
}

int ScottMain(void) {
	WDTCTL = WDTPW | WDTHOLD;		// Stop watchdog timer
	P1DIR |= 0x01;					// Set P1.0 to output direction

	for(;;) {
		volatile unsigned int i;	// volatile to prevent optimization

		P1OUT ^= 0x01;				// Toggle P1.0 using exclusive-OR

		i = 20000;					// SW Delay
		do i--;
		while(i != 0);
	}

	return 0;
}

int SteveMain(void) {
	WDTCTL = WDTPW | WDTHOLD;		// Stop watchdog timer
	P1DIR |= 0x01;					// Set P1.0 to output direction

	for(;;) {
		volatile unsigned int i;	// volatile to prevent optimization

		P1OUT ^= 0x01;				// Toggle P1.0 using exclusive-OR

		i = 30000;					// SW Delay
		do i--;
		while(i != 0);
	}

	return 0;
}

int ManzirMain(void) {
	WDTCTL = WDTPW | WDTHOLD;		// Stop watchdog timer
	P1DIR |= 0x01;					// Set P1.0 to output direction

	for(;;) {
		volatile unsigned int i;	// volatile to prevent optimization

		P1OUT ^= 0x01;				// Toggle P1.0 using exclusive-OR

		i = 40000;					// SW Delay
		do i--;
		while(i != 0);
	}

	return 0;
}



